<!DOCTYPE html>
<html  lang="en" xmlns:th="http://www.thymeleaf.org"
 		xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4">
    <head>
        <meta charset="utf-8">
        <title>
          用户信息管理
        </title>
        <meta name="renderer" content="webkit">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="format-detection" content="telephone=no">
     <link rel="stylesheet" th:href="@{/css/x-admin.css}" media="all">
    </head>
    <body class="layui-bg-gray">
        <div class="x-nav">
         
            <a><span class="hidden-phone" id="username" sec:authentication="name"></span> 您好！您的 <cite>的个人信息</cite></a>
           <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right"  href="javascript:location.replace(location.href);" title="刷新"><i class="layui-icon" style="line-height:30px">ဂ</i></a>
        </div>
        <div class="x-body">
        
         
         
          <form class="layui-form">
                <div class="layui-form-item">
                    <label for="username" class="layui-form-label">登录名</label>
                    <div class="layui-input-inline">
                        <input type="text" id="username" name="username"   th:value="${user.username}" readonly="readonly"
                         class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label for="phone" class="layui-form-label">状态</label>
                    
                    <div class="layui-input-inline">
                        <input type="text" id="Active" name="Active" th:value="${user.Active}" readonly="readonly"
                         class="layui-input">
                    </div>
                </div>
                
                <div class="layui-form-item">
                    <label for="phone" class="layui-form-label">邮箱</label>
                    
                    <div class="layui-input-inline">
                        <input type="text" id="email" name="email" th:value="${user.email}" readonly="readonly"
                         class="layui-input">
                    </div>
                </div>
                
                <div class="layui-form-item">
                    <label for="phone" class="layui-form-label">注册日期</label>
                    
                    <div class="layui-input-inline">
                        <input type="text" id="createadte" name="createdate" th:value="${#dates.format(user.createdate, 'dd/MMM/yyyy')}" readonly="readonly"
                         class="layui-input">
                    </div>
                </div>
                
                <div class="layui-form-item">
                    <label for="phone" class="layui-form-label">角色</label>
                    
                    <div class="layui-input-inline" th:each="role:${user.roles}">
                        <input type="text" id="role" name="rolename" th:value="${role.rolename}"  readonly="readonly"
                         class="layui-input">
                    </div>
                </div>
                
            </form>
         
         
         
         
        </div>
        
        
  <!--=====================================javascript================================= -->     
    <script th:src="@{/lib/layui/layui.js}" charset="utf-8"></script>
    <script th:src="@{/js/x-layui.js}" charset="utf-8"></script>
         
        
       <script type="text/javascript">
       
       
    	  　function myInfo(){ 
    		  
    		  var userObj=document.getElementById("username");　
    		  var username=userObj.innerHTML;　
    		  console.log(username);
 		　} 　　
    	   
    	  window.onload = myInfo;
    
       
		　
		
		
		</script>
        
      
        
     
    </body>
</html>